08. Exercise 2: Segmentation Hands On
Introduction
Exercise 2: Segmentation Hands-On
This exercise will give you the chance to try out a segmentation network in action. I hope you like it!
Udacity Workspace Note: This workspace is a Jupyter Notebook which has GPU as an option for you to use. At the bottom left of that workspace you will be able to enable/disable GPU. You will only be allocated a set amount of compute hours for the course so while you are just coding you should disable the GPU. When you want to run the training code you can turn it back on to speed the process up. Make sure to also configure PyTorch to use the GPU device.
Code
If you need a code on the https://github.com/udacity.
Closing Remarks
I hope you enjoyed the exercise. You can find the solution for the Exercise 2: Segmentation Hands On here. If you managed to complete it - you are officially well versed with DICOM, NIFTI, and PyTorch to begin training and designing your own neural networks for medical imaging classification, object detection, and segmentation problems! However, a few important pieces remain. For example, you have noticed that we used simple cross-entropy loss as our cost function. Is this the best cost function possible? Also, after you have your segmentation - how do you efficiently compare it to your ground truth and evaluate performance? We will talk about these things further in this lesson.
A couple of final remarks below.
Further Resources
- If you looked closer at the code for the segmentation network that you have trained in this exercise, you should have noticed the ConvTranspose2D layers and you might be wondering what those are. Remember the upsampling path in the U-net? This is how this upsampling is done. Going into details of those would be straying too far from this course, so if you are curious to learn more about transposed convolutions, how they work, and why, you can read up this blog post: Up-sampling with Transposed Convolution by Naoki Shibuya.
- A deep dive into the general approach to building segmentation networks: Long, Jonathan et al. “Fully convolutional networks for semantic segmentation.” 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2015): 3431-3440.
- A UNet page by the author, Olaf Ronneberger, with a nice video explaining its principles of operation
- UNet and overall CNN/DeepLearning content
- [Another great explanation of UNet](https://spark-in.me/post/unet-adventures-part-one-getting-acquainted-with-unet
) - An overview of radiogenomics: Bodalal, Z., Trebeschi, S., Nguyen-Kim, T.D.L. et al. Radiogenomics: bridging imaging and genomics. Abdom Radiol 44, 1960–1984 (2019). https://doi.org/10.1007/s00261-019-02028-w